package cn.bonoon.controllers.ms;

import cn.bonoon.core.IMessageEditor;
import cn.bonoon.entities.plugins.AccountEntity;
import cn.bonoon.kernel.annotations.Transform;
import cn.bonoon.kernel.annotations.TransformField;
import cn.bonoon.kernel.support.models.ObjectEditor;
import cn.bonoon.kernel.web.annotations.AutoDataLoader;
import cn.bonoon.kernel.web.annotations.components.AsComboBox;
import cn.bonoon.kernel.web.annotations.components.AsTextArea;
import cn.bonoon.kernel.web.annotations.components.ComboMultipleChecker;
import cn.bonoon.kernel.web.annotations.form.FormEditor;
import cn.bonoon.kernel.web.annotations.form.PropertyEditor;

@Transform
@FormEditor(2)
public class MessageEditor extends ObjectEditor implements MessageDefine, IMessageEditor {

	private static final long serialVersionUID = 7488609459960478112L;

	@PropertyEditor(value = 0, required = true)
	private String title;

	@PropertyEditor(value = 1, required = true, name = "接收人")
	@AsComboBox
	@TransformField
	@AutoDataLoader(AccountEntity.class)
	@ComboMultipleChecker
	private Long[] acceptsid;

	@PropertyEditor(value = 2, required = true, colspan = 1)
	@AsTextArea
	private String content;

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long[] getAcceptsid() {
		return acceptsid;
	}

	public void setAcceptsid(Long[] acceptsid) {
		this.acceptsid = acceptsid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

}
